<%@ page import="com.itcat.cn.pojo.Brand" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: DongHuaYuan
  Date: 2024/1/15
  Time: 10:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商品列表</title>
</head>
<body>
    <%!
        List<Brand> brands = new ArrayList();
    %>

    <input type="button" value="新增">
    <hr/>
    <table border="1" cellpadding="0" width="800">
        <tr>
            <th>序号</th>
            <th>品牌名称</th>
            <th>企业名称</th>
            <th>排序</th>
            <th>品牌介绍</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        <%--<tr align="center">--%>
        <%--<td>1</td>--%>
        <%--<td>三只松鼠</td>--%>
        <%--<td>三只松鼠</td>--%>
        <%--<td>100</td>--%>
        <%--<td>三只松鼠，好吃不上火</td>--%>
        <%--<td> <a href="#">修改</a> <a href="#">删除</a></td>--%>
        <%--</tr>--%>

        <%
            brands.add(new Brand(1, "三只松鼠", "三只松鼠", 100, "三只松鼠,好吃不上火", 1));
            brands.add(new Brand(2, "三只松鼠", "三只松鼠", 100, "三只松鼠,好吃不上火", 1));
            brands.add(new Brand(3, "三只松鼠", "三只松鼠", 100, "三只松鼠,好吃不上火", 1));
            for (int i = 0; i < brands.size(); i++) {
                Brand brand = brands.get(i);
        %>
        <tr align="center">
            <td><%= brand.getId() %></td>
            <td><%= brand.getBrandName() %></td>
            <td><%= brand.getCompanyName() %></td>
            <td><%= brand.getOrdered() %></td>
            <td><%= brand.getDescription() %></td>
            <%
            if (brand.getStatus() == 0){
                %>

                <td><%= "启用" %></td>

                <%
                 }else {
                %>

                 <td><%= "不启用" %></td>

                <%
                    }
                %>

            <td><a href="#">修改</a> <a href="#">删除</a></td>
        </tr>
        <%
            }
        %>
    </table>

</body>
</html>
